<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def on_right_align_toggled(self, chk):
 """set the horizontal alignment setting. """

        v = chk.get_active()
        self.settings.general.set_int('window-halignment', 1 if v else 0)