Posts | Tags | Archive

Making Steam for Linux close to the system tray

Steam for Linux is a little odd in how it handles a user clicking the close button. Instead of exiting the program or mimimizing the application to the system tray, it just minimizes it to the taskbar. The developers have said that this is temporary and that it will be changed in the future, but for now, there is a workaround.

To make Steam always minimize to the system tray, just add STEAM_FRAME_FORCE_CLOSE=1 to your environment.

For more information see the original GitHub issue.


Github: Convert an issue to a pull request

Github currently doesn't provide a way to convert an issue to a pull request in their interface. However, the capability exists in their Pull Request API.

Update

I've built a webapp to make this easier. Check it out at https://i2p.cmetcalfe.ca.

To call the API using a simple curl command, run the command:

1
2
3
4
curl --user "[github username]" \
     --request POST \
     --data '{"issue": "[issue num]", "head": "[branch to merge from]", "base": "[branch to merge into]"}' \
     https://api.github.com/repos/[user]/[repo]/pulls

For example, to make user1 change issue 13 into a pull request to merge branch test_branch into master in the testing_repo repository belonging to user2, the command would be:

1
2
3
4
curl --user 'user1' \
     --request POST \
     --data '{"issue": "13", "head": "test_branch", "base": "master"}' \
     https://api.github.com/repos/user2/testing_repo/pulls

To specify a fork of a reposity to merge from, put the username followed by a semicolon in front of the branch name like so: "username:branch_name"

After running the command, you will be prompted for your Github password. Enter it and curl should output the JSON response from the API. Make sure to check this response for errors!


Forcing a media refresh on Android with adb

Android will automatically perform a media refresh when an SD card is mounted.

Using adb, we can fake that event by manually sending a MEDIA_MOUNTED intent.

For example, if you wanted to run a media refresh of the entire SD card:

1
adb -d shell "am broadcast -a android.intent.action.MEDIA_MOUNTED -d file:///sdcard"

To refresh different directory, just change "/sdcard" to the absolute path of the directory you want to refresh.

For more fine-grained control, use the MEDIA_SCANNER_SCAN_FILE intent, which triggers a rescan of a single file.

© Carey Metcalfe. Built using Pelican. Theme is subtle by Carey Metcalfe. Based on svbhack by Giulio Fidente.